  <div style="float:right">
    当前位置:<%=session["navigation"]%>
  </div>
  <br/>
  <br/>
  <br/>
<div id="custom_allocation">
  <div id="hided_tables">
  </div>
  <div id="tables" >
    <%@tables.each do |table|%>
      <%=render :partial=>'table',:locals=>{:table=>table}%>
    <%end%>
  </div>
  <span class="pending_table" id="pending_table">
      待分配人员
      <hr/>
      <ul id="pending_users">
          <%for user in session["pending_users"]%>
            <%=render :partial=>'pending_user',:locals=>{:user=>user}%>
          <%end%>
      </ul>
      <br/>
      <br/>
      <a href="#" onclick="Element.toggle('add_user');return false">添加人员</a>   |
      <%=link_to '返回餐桌分配',event_dine_tables_path(:event_id=>@dine.event.id,:dine_id=>@dine.id)%>
      <br/>
      <span id="add_user" style='display:none'>
        <br/>
        <%remote_form_for :user,:url=>{:action=>'add_user',:dine_id=>@dine.id} do |f|%>
          <%=f.select :from,@user_hash.keys,{},{ "onchange" => remote_function(
                    :with => "'from='+value",
                    :update => "next_select",
                    :url => { :action => :select_with_ajax,:dine_id=>@dine.id } ) }%>
          <br/>
          <span id="next_select"></span>
          <%=f.submit '添加'%>
        <%end%>
      </span>
  </span>
  <%=drop_receiving_element("pending_table",:accept=>'.pending_allocation',:with=>"'user_id='+ encodeURIComponent(($(ui.draggable).attr('id')).split('_').last()) + ';table=' + encodeURIComponent(($(ui.draggable).attr('id')).split('_').first())",:url=>{:action=>'allocation_user_to_pending'})%>
</div>